package cn.itsource.org.controller;

import cn.itsource.common.util.AjaxResult;
import cn.itsource.org.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/employee")
public class EmployeeController {
    @Autowired
    private IEmployeeService employeeService;

    /**
     * 查询所有员工列表
     * @return
     */
    @PatchMapping("/queryAllEmployee")
    public AjaxResult queryAllEmployee(){
        return AjaxResult.me().setSuccess(true)
                .setResultObj(employeeService.queryAllEmployee());
    }
}
